const sequelize = require("./db");
const { DataTypes } = require("sequelize");

const Grant = sequelize.define("user_area", {
  user_id: {
    type: DataTypes.INTEGER,
  },
  area_id: {
    type: DataTypes.INTEGER,
  },
  granted_by: {
    type: DataTypes.INTEGER,
  },
  granted_at: {
    type: DataTypes.DATE
  }
}, {
  tableName: "user_area",
  createdAt: false,
  updatedAt: false,
  paranoid: false
});

module.exports = Grant;